cmake_minimum_required(VERSION 3.10.2)

set(APPNAME SipServer)
project(${APPNAME})

set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -pthread ")

set(CMAKE_BUILD_TYPE DEBUG)
SET(CMAKE_CXX_FLAGS_DEBUG "$ENV{CXXFLAGS} -O0 -Wall -g2 -ggdb")
SET(CMAKE_CXX_FLAGS_RELEASE "$ENV{CXXFLAGS} -O3 -Wall")

message(STATUS "CMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS}")

include_directories(/usr/local/include)
set(osip2Lib /usr/local/lib/libosip2.so 
    /usr/local/lib/libeXosip2.so
    /usr/local/lib/libosipparser2.so)

add_executable(${APPNAME}
        utils/MD5.c
        utils/HTTPDigest.c
        SipServer.cpp
        main.cpp)
        
TARGET_LINK_LIBRARIES(${APPNAME} ${osip2Lib})





